home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Tele / C / Comet2.1.3.cpt / include / key.h < prev    next >
Text File  |  1990-08-03  |  1KB  |  55 lines

  1.  
  2. /*
  3.     Copyright Cornell University 1986.  All rights are reserved.
  4.  
  5. */
  6.  
  7. /* key mapping vars */
  8.  
  9. #ifndef _KEYDEF
  10. #define _KEYDEF
  11.  
  12. /* action queue handling */
  13. /*    define the token type returned from the user interface routine            */
  14.  
  15. struct token {
  16.     unsigned char class;
  17.     unsigned char entry;
  18. };
  19.  
  20. typedef struct token TOKEN;
  21. extern int q_cnt;
  22.  
  23. extern void keyputaction();
  24. extern void putaction();
  25. extern struct token * getaction();
  26.  
  27. /* key buffer get key struct * call */
  28. struct key {
  29.     char keycode;
  30.     char thechar;
  31.     int modifiers;
  32. };            
  33.  
  34.  
  35. /* key macro items */
  36.  
  37. struct keyxlist {
  38.     int    actlen;                    /* number of actions in key exception resource */
  39.     Handle hkeyact;                /* handle to key exception resource */
  40.     struct keyxlist * nextkey;
  41. };
  42.  
  43. /* structure of the keyid/action list thing hkeyact points to */
  44. struct keyactlist {
  45.     long    keyid;
  46.     struct token act[1];
  47. };
  48.  
  49. extern char * keyname();        /* forward declaration */
  50. extern struct token * keyxfind();        /* forward declaration */
  51. extern struct keyxlist * keyxptr();        /* forward declaration */
  52. extern struct keyxlist * keyxhead;
  53.  
  54. #endif
  55.